#include <time.h>
#include <chrono>
#include <ctime>
#include <ratio>



#include "testingWeightOptimization.cpp"

/**
 * @brief main
 *
 * All the tests presented in the final report.
 *
 * Most of the functions called here are script-like
 * i.e. they execute the whole test and return nothing
 */
int main(){

    testDistanceMethods();

    testTypePrediction();

    testTwoStepPrediction();

    finalTwoStepTest();

    /*
    //Weight optimization tests
    int k = 8;
    int a  = weightOptimizer("t.txt", k);
    readFinalResults(a,"t.txt", k);
    */
}

int weightOptimizer(std::string resultFileName, int k)
{
    std::string file = "set.csv";
    Cellar training(file);
    std::vector<Wine*> testing = training.getWinePointers();
    double fu = 0.25;
    training.setQforMinkowski(fu);
    training.setNumOfWinesForAveragePredict(k);
    training.setDistanceType(Cellar::SQUARED_EUCLIDEAN);

    // Cellarin parametrit vois asettaa tassa myos
    // tai lukee myos config tiedostosta
    FileHandler fileHandler(resultFileName);
    std::vector<std::vector<double> > weightVecs;
    if(!fileHandler.readConfigForWeightVectors("config.txt", weightVecs))
    {
        std::cout << "Something wrong with the config file";
        return 1;
    }

